<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

use App\Http\Services\HaoTing;


/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

Route::group(['middleware' => ['web']], function () {

    Route::get('menu',['as' => 'Home.Page.menu', 'uses' => 'HomeController@menu']);
    Route::get('content',['as' => 'Home.Page.content', 'uses' => 'HomeController@content']);
    Route::get('notice',['as' => 'Home.Page.notice', 'uses' => 'HomeController@notice']);

    Route::group(['prefix'=>'admin'],function(){
        //锟斤拷锟截碉拷录页锟斤拷
        Route::get('login',['as' => 'Admin.Home.login', 'uses' => 'AdminController@login']);
        //锟斤拷锟斤拷锟睫革拷锟斤拷锟斤拷页锟斤拷
        Route::get('changePwd',['as' => 'Admin.Home.changePwd', 'uses' => 'AdminController@changePwd']  );
        //个人信息列表
        Route::get('user-list',['as' => 'Admin.Home.userList', 'uses' => 'AdminController@userList']);
        //个人信息详情列表
        Route::get('user-list-detail',['as' => 'Admin.Home.userListDetail' , 'uses' => 'AdminController@userListDetail']);
        //企业信息列表
        Route::get('company-info-list',['as' => 'Admin.Home.companyInfoList' , 'uses' => 'AdminController@companyInfoList']);
        //企业信息详情列表
        Route::get('company-info-list-detail',['as' => 'Admin.Home.companyInfoListDetail' , 'uses' => 'AdminController@companyInfoListDetail']);
        //个人认证列表
        Route::get('personal-auth-list',['as' => 'Admin.Home.personalAuthList' , 'uses' => 'AdminController@personalAuthList']);
        //企业认证列表
        Route::get('company-auth-list',['as' => 'Admin.Home.companyAuthList' , 'uses' => 'AdminController@companyAuthList']);
        //关于我们
        Route::get('project-list',['as' => 'Admin.Home.projectList', 'uses' => 'AdminController@projectList']);
        Route::get('project-set',['as' => 'Admin.Home.projectSet', 'uses' => 'AdminController@projectSet']);
        //联系我们
        Route::get('info-list',['as' => 'Admin.Home.infoList', 'uses' => 'AdminController@infoList']);
        Route::get('info-set',['as' => 'Admin.Home.infoSet', 'uses' => 'AdminController@infoSet']);
        //意见反馈
        Route::get('feed-backs-list',['as' => 'Admin.Home.feedBacksList', 'uses' => 'AdminController@feedBacksList']);
        //置顶服务
        Route::get('top-record-list',['as' => 'Admin.Home.TopRecordList', 'uses' => 'AdminController@TopRecordList']);
        Route::get('set-top-rule-list',['as' => 'Admin.Home.setTopRuleList', 'uses' => 'AdminController@setTopRuleList']);
        Route::get('set-top-rule-set',['as' => 'Admin.Home.setTopRuleSet', 'uses' => 'AdminController@setTopRuleSet']);
        //支付信息
        Route::get('orders-list',['as' => 'Admin.Home.ordersList', 'uses' => 'AdminController@ordersList']);
        //banner列表
        Route::get('banner-list',['as' => 'Admin.Home.bannerList', 'uses' => 'AdminController@bannerList']);
        Route::get('banner-set',['as' => 'Admin.Home.bannerSet', 'uses' => 'AdminController@bannerSet']);
        //职位列表
        Route::get('position-list',['as' => 'Admin.Home.positionList', 'uses' => 'AdminController@positionList']);
        Route::get('position-list-detail',['as' => 'Admin.Home.positionListDetail', 'uses' => 'AdminController@positionListDetail']);
        Route::get('position-resume-list',['as' => 'Admin.Home.positionResumeList', 'uses' => 'AdminController@positionResumeList']);
        Route::get('position-resume-list-detail',['as' => 'Admin.Home.resumeListDetail', 'uses' => 'AdminController@resumeListDetail']);
        Route::get('resume-list-detail',['as' => 'Admin.Home.resumeUserDetail', 'uses' => 'AdminController@resumeUserDetail']);

        //行业列表
        Route::get('trade-list',['as' => 'Admin.Home.tradeList', 'uses' => 'AdminController@tradeList']);
        //职位分类列表
        Route::get('job-type-list',['as' => 'Admin.Home.jobTypeList', 'uses' => 'AdminController@jobTypeList']);
        Route::get('job-type-set',['as' => 'Admin.Home.jobTypeSet', 'uses' => 'AdminController@jobTypeSet']);
        //招商广告列表
        Route::get('inviting-advert-list',['as' => 'Admin.Home.invitingAdvertList', 'uses' => 'AdminController@invitingAdvertList']);
        Route::get('inviting-advert-set',['as' => 'Admin.Home.invitingAdvertSet', 'uses' => 'AdminController@invitingAdvertSet']);
        Route::get('inviting-advert-classify-list',['as' => 'Admin.Home.invitingAdvertClassifyList', 'uses' => 'AdminController@invitingAdvertClassifyList']);
        //简历管理
        Route::get('resume-list',['as' => 'Admin.Home.resumeList', 'uses' => 'AdminController@resumeList']);
        Route::get('joy-list',['as' => 'Admin.Home.joyInfoList', 'uses' => 'AdminController@joyInfoList']);
        Route::get('joy-set',['as' => 'Admin.Home.joySet', 'uses' => 'AdminController@joySet']);
        Route::get('order-list',['as' => 'Admin.Home.orderList', 'uses' => 'AdminController@orderList']);
        Route::get('notice-list',['as' => 'Admin.Home.noticeList', 'uses' => 'AdminController@noticeList']);
        Route::get('notice-set',['as' => 'Admin.Home.noticeSet', 'uses' => 'AdminController@noticeSet']);
        Route::get('address-list',['as' => 'Admin.Home.addressInfoList', 'uses' => 'AdminController@addressInfoList']);
        Route::get('address-set',['as' => 'Admin.Home.addressSet', 'uses' => 'AdminController@addressSet']);
        Route::get('skill-label-list',['as' => 'Admin.Home.skillLabelList', 'uses' => 'AdminController@skillLabelList']);

    });

    Route::group(['prefix'=>'api', 'namespace'=>'Api','middleware' => ['cors','api']],function(){

        Route::any('/updateCode',['as' => 'System.Update.Code', 'uses' => 'SystemController@updateCode']);

        Route::group(['prefix' => 'other'],function(){
            Route::get('get-banner-list',['as'=>'Api.Other.getBannerList','uses'=>'OtherController@getBannerList']);
            Route::get('get-joy-info-list',['as'=>'Api.Other.getJoyInfoList','uses'=>'OtherController@getJoyInfoList']);
            Route::get('get-notice-list',['as'=>'Api.Other.getNoticeList','uses'=>'OtherController@getNoticeList']);
            Route::get('get-notice',['as'=>'Api.Other.getNotice','uses'=>'OtherController@getNotice']);
            Route::get('get-address',['as'=>'Api.Other.getAddress','uses'=>'OtherController@getAddress']);
            Route::get('get-address-all',['as'=>'Api.Other.getAddressAll','uses'=>'OtherController@getAddressAll']);
            Route::get('get-address-all-town',['as'=>'Api.Other.getAddressAllToTown','uses'=>'OtherController@getAddressAllToTown']);
            Route::get('goToUrl',['as'=>'Api.Other.goToUrl','uses'=>'OtherController@goToUrl']);

        });

        Route::group(['prefix' => 'wx'],function(){
            Route::any('index',['as'=>'Api.Wechat.index','uses'=>'WechatController@index']);
            Route::any('getJsApiPacket',['as'=>'Api.Wechat.getJsApiPacket','uses'=>'WechatController@getJsApiPacket']);
        });

        Route::group(['prefix' => 'admin','namespace'=>'Admin'],function(){
            Route::post('auth/sign-in',['as'=>'Api.Admin.Auth.signInAdmin','uses'=>'AuthController@signInAdmin']);
            Route::post('auth/change-pwd',['as'=>'Api.Admin.Auth.changePassword','uses'=>'AuthController@changePassword']);
            Route::get('signOut', ['as'=>'Api.Admin.Auth.signOut', 'uses'=>'AuthController@signOut']);

            Route::post('sys/setBanner',['as'=>'Api.Admin.sys.setBanner','uses'=>'SystemController@setBanner']);
            Route::post('sys/delBanner',['as'=>'Api.Admin.sys.delBanner','uses'=>'SystemController@delBanner']);

            Route::post('sys/addClassify',['as'=>'Api.Admin.sys.addClassify','uses'=>'SystemController@addClassify']);
            Route::post('sys/delClassify',['as'=>'Api.Admin.sys.delClassify','uses'=>'SystemController@delClassify']);

            Route::post('sys/addTrade',['as'=>'Api.Admin.sys.addTrade','uses'=>'SystemController@addTrade']);
            Route::post('sys/delTrade',['as'=>'Api.Admin.sys.delTrade','uses'=>'SystemController@delTrade']);

            Route::post('sys/addJobType',['as'=>'Api.Admin.sys.addJobType','uses'=>'SystemController@addJobType']);
            Route::post('sys/delJobType',['as'=>'Api.Admin.sys.delJobType','uses'=>'SystemController@delJobType']);

            Route::post('sys/delPosition',['as'=>'Api.Admin.sys.delPosition','uses'=>'SystemController@delPosition']);
            Route::post('sys/delResume',['as'=>'Api.Admin.sys.delResume','uses'=>'SystemController@delResume']);
            Route::post('sys/delInvitingAdvert',['as'=>'Api.Admin.sys.delInvitingAdvert','uses'=>'SystemController@delInvitingAdvert']);
            Route::post('sys/delInvitingAdvertClassify',['as'=>'Api.Admin.sys.delInvitingAdvertClassify','uses'=>'SystemController@delInvitingAdvertClassify']);
            Route::post('sys/setInvitingAdvert',['as'=>'Api.Admin.sys.setInvitingAdvert','uses'=>'SystemController@setInvitingAdvert']);
            Route::post('sys/setInvitingAdvertClassify',['as'=>'Api.Admin.sys.setInvitingAdvertClassify','uses'=>'SystemController@setInvitingAdvertClassify']);
            Route::post('sys/setJoy',['as'=>'Api.Admin.sys.setJoy','uses'=>'SystemController@setJoy']);
            Route::post('sys/delJoy',['as'=>'Api.Admin.sys.delJoy','uses'=>'SystemController@delJoy']);

            Route::post('sys/setProject',['as'=>'Api.Admin.sys.setProject','uses'=>'SystemController@setProject']);
            Route::post('sys/setInfo',['as'=>'Api.Admin.sys.setInfo','uses'=>'SystemController@setInfo']);
            Route::post('sys/setTopRule',['as'=>'Api.Admin.sys.setTopRule','uses'=>'SystemController@setTopRule']);
            Route::post('sys/delTopRule',['as'=>'Api.Admin.sys.delTopRule','uses'=>'SystemController@delTopRule']);
            Route::post('sys/delPosition',['as'=>'Api.Admin.sys.delPosition','uses'=>'SystemController@delPosition']);
            Route::post('sys/setCompanyAuth',['as'=>'Api.Admin.sys.setCompanyAuth','uses'=>'SystemController@setCompanyAuth']);
            Route::post('sys/setPersonalAuth',['as'=>'Api.Admin.sys.setPersonalAuth','uses'=>'SystemController@setPersonalAuth']);
            Route::post('sys/delNotice',['as'=>'Api.Admin.sys.delNotice','uses'=>'SystemController@delNotice']);
            Route::post('sys/setNotice',['as'=>'Api.Admin.sys.setNotice','uses'=>'SystemController@setNotice']);
            Route::post('sys/delAddress',['as'=>'Api.Admin.sys.delAddress','uses'=>'SystemController@delAddress']);
            Route::post('sys/setAddress',['as'=>'Api.Admin.sys.setAddress','uses'=>'SystemController@setAddress']);
            Route::post('sys/delProject',['as'=>'Api.Admin.sys.delProject','uses'=>'SystemController@delProject']);
            Route::post('sys/checkAdvent',['as'=>'Api.Admin.sys.checkAdvent','uses'=>'SystemController@checkAdvent']);
            Route::post('sys/setSkillLabel',['as'=>'Api.Admin.sys.setSkillLabel','uses'=>'SystemController@setSkillLabel']);
            Route::post('sys/delSkillLabel',['as'=>'Api.Admin.sys.delSkillLabel','uses'=>'SystemController@delSkillLabel']);


        });

        Route::group(['prefix' => 'file'],function(){
            Route::post('upload-image',['as'=>'Api.File.upload','uses'=>'ImageController@upload']);
            Route::post('upload-video',['as'=>'Api.File.uploadVideo','uses'=>'ImageController@uploadVideo']);
            Route::get('show-image/{id}',['as'=>'Api.File.showImageById','uses'=>'ImageController@showImageById']);
            Route::post('upload-user-photo',['as'=>'Api.File.uploadUserPhoto','uses'=>'ImageController@uploadUserPhoto']);
            Route::post('UploadBase64',['as'=>'Api.File.uploadBase64Image','uses'=>'ImageController@uploadBase64Image']);
        });

        Route::group(['prefix' => 'auth'],function(){
            Route::post('wxAppLogin',['as'=>'Api.Auth.wxAppLogin','uses'=>'AuthController@wxAppLogin']);
            Route::post('sendVerificationCode',['as'=>'Api.Auth.sendVerificationCode','uses'=>'AuthController@sendVerificationCode']);
            Route::post('saveRegisterInfo',['as'=>'Api.Auth.saveRegisterInfo','uses'=>'AuthController@saveRegisterInfo']);
            Route::post('webLogin',['as'=>'Api.Auth.webLogin','uses'=>'AuthController@webLogin']);
            Route::post('changePassword',['as'=>'Api.Auth.changePassword','uses'=>'AuthController@changePassword']);
            Route::post('retrievePassword',['as'=>'Api.Auth.retrievePassword','uses'=>'AuthController@retrievePassword']);
            Route::post('register',['as'=>'Api.Auth.register','uses'=>'AuthController@register']);
            Route::any('wechatCallback',['as'=>'Api.Auth.wechatCallback','uses'=>'AuthController@wechatCallback']);
            Route::get('wechatLogin',['as'=>'Api.Auth.wechatLogin','uses'=>'AuthController@wechatLogin']);
        });

        Route::group(['prefix' => 'ucenter'],function(){
            Route::post('setUserInfo',['as'=>'Api.UserCenter.setUserInfo','uses'=>'UserCenterController@setUserInfo']);
            Route::get('getUserInfo',['as'=>'Api.UserCenter.getUserInfo','uses'=>'UserCenterController@getUserInfo']);
            Route::get('getCompanyInfo',['as'=>'Api.UserCenter.getCompanyInfo','uses'=>'UserCenterController@getCompanyInfo']);
            Route::post('setCompanyAuthInfo',['as'=>'Api.UserCenter.setCompanyAuthInfo','uses'=>'UserCenterController@setCompanyAuthInfo']);
            Route::post('setCompanyInfo',['as'=>'Api.UserCenter.setCompanyInfo','uses'=>'UserCenterController@setCompanyInfo']);
            Route::post('setResume',['as'=>'Api.UserCenter.setResume','uses'=>'UserCenterController@setResume']);
            Route::get('getResume',['as'=>'Api.UserCenter.getResume','uses'=>'UserCenterController@getResume']);
            Route::get('getUserResume',['as'=>'Api.UserCenter.getUserResume','uses'=>'UserCenterController@getUserResume']);
            Route::get('getReceivedResumeList',['as'=>'Api.UserCenter.getReceivedResumeList','uses'=>'UserCenterController@getReceivedResumeList']);
            Route::post('sendResume',['as'=>'Api.UserCenter.sendResume','uses'=>'UserCenterController@sendResume']);
            Route::post('setUserFollow',['as'=>'Api.UserCenter.setUserFollow','uses'=>'UserCenterController@setUserFollow']);
            Route::post('delMyPosition',['as'=>'Api.UserCenter.delMyPosition','uses'=>'UserCenterController@delMyPosition']);
            Route::get('getUserFollowPositionList',['as'=>'Api.UserCenter.getUserFollowPositionList','uses'=>'UserCenterController@getUserFollowPositionList']);
        });


        Route::group(['prefix' => 'resume'],function(){

            Route::get('getUserResume',['as'=>'Api.Resume.getUserResume','uses'=>'ResumeController@getUserResume']);
            Route::get('getAllResume',['as'=>'Api.Resume.getAllResume','uses'=>'ResumeController@getAllResume']);
            Route::post('addResume',['as'=>'Api.Resume.addResume','uses'=>'ResumeController@addResume']);
            Route::post('delExperience',['as'=>'Api.Resume.addResume','uses'=>'ResumeController@delExperience']);
            Route::get('getLabel',['as'=>'Api.Resume.getLabel','uses'=>'ResumeController@getLabel']);
            Route::get('resumeDetail',['as'=>'Api.Resume.resumeDetail','uses'=>'ResumeController@resumeDetail']);
            Route::post('buildResume',['as'=>'Api.Resume.buildResume','uses'=>'ResumeController@buildResume']);
            Route::post('deleteResume',['as'=>'Api.Resume.deleteResume','uses'=>'ResumeController@deleteResume']);
        });

        Route::group(['prefix' => 'cert'],function(){
            Route::get('getPersonalAuth',['as'=>'Api.Cert.getPersonalAuth','uses'=>'CertController@getPersonalAuth']);
            Route::post('setPersonalAuth',['as'=>'Api.Cert.setPersonalAuth','uses'=>'CertController@setPersonalAuth']);
            Route::get('judCertDeta',['as'=>'Api.Cert.judCertDeta','uses'=>'CertController@judCertDeta']);
            Route::get('getCompanyAuth',['as'=>'Api.Cert.getCompanyAuth','uses'=>'CertController@getCompanyAuth']);
            Route::post('setCompanyAuth',['as'=>'Api.Cert.setCompanyAuth','uses'=>'CertController@setCompanyAuth']);
        });

        Route::group(['prefix' => 'position'],function(){
            Route::get('getIndustryList',['as'=>'Api.Position.getIndustryList','uses'=>'PositionController@getIndustryList']);
            Route::get('getPositionType',['as'=>'Api.Position.getPositionType','uses'=>'PositionController@getPositionType']);
            Route::post('createPositionInfo',['as'=>'Api.Position.createPositionInfo','uses'=>'PositionController@createPositionInfo']);
            Route::get('getPositionList',['as'=>'Api.Position.getPositionList','uses'=>'PositionController@getPositionList']);
            Route::get('getPositionDetail',['as'=>'Api.Position.getPositionDetail','uses'=>'PositionController@getPositionDetail']);
            Route::get('setTopRule',['as'=>'Api.Position.setTopRule','uses'=>'PositionController@setTopRule']);
            Route::post('reloadPosition',['as'=>'Api.Position.reloadPosition','uses'=>'PositionController@reloadPosition']);
            Route::post('releaseInfo',['as'=>'Api.Position.releaseInfo','uses'=>'PositionController@releaseInfo']);
        });
        Route::group(['prefix'=>'advert'],function (){
            Route::post('setInvitingAdvert',['as'=>'Api.InvitingAdvert.setInvitingAdvert','uses'=>'InvitingAdvertController@setInvitingAdvert']);
            Route::get('getInvitingAdvert',['as'=>'Api.InvitingAdvert.getInvitingAdvert','uses'=>'InvitingAdvertController@getInvitingAdvert']);
            Route::get('getClassify',['as'=>'Api.InvitingAdvert.getClassify','uses'=>'InvitingAdvertController@getClassify']);
            Route::get('getMyInvitingAdvert',['as'=>'Api.InvitingAdvert.getMyInvitingAdvert','uses'=>'InvitingAdvertController@getMyInvitingAdvert']);
            Route::post('delMyInvitingAdvert',['as'=>'Api.InvitingAdvert.delMyInvitingAdvert','uses'=>'InvitingAdvertController@delMyInvitingAdvert']);
            Route::get('getAdvert',['as'=>'Api.InvitingAdvert.getAdvert','uses'=>'InvitingAdvertController@getAdvert']);
            Route::get('getTypeList',['as'=>'Api.InvitingAdvert.getTypeList','uses'=>'InvitingAdvertController@getTypeList']);
        });

        Route::group(['prefix'=>'payment'],function (){
            Route::post('wechatAppPay',['as'=>'Api.Payment.wechatAppPay','uses'=>'PaymentController@wechatAppPay']);
            Route::post('wechatH5Pay',['as'=>'Api.Payment.payByWechatH5','uses'=>'PaymentController@payByWechatH5']);
            Route::any('appPayCallback',['as'=>'Api.Payment.appPayCallback','uses'=>'PaymentController@appPayCallback']);
            Route::any('wxPayCallback',['as'=>'Api.Payment.wxPayCallback','uses'=>'PaymentController@wxPayCallback']);
//            Route::get('wechatPay',['as'=>'Api.Payment.wechatPay','uses'=>'PaymentController@wechatPay']);
        });

         Route::group(['prefix'=>'order'],function (){
             Route::post('buildOrder',['as'=>'Api.Order.buildOrder','uses'=>'OrderController@buildOrder']);
         });

        Route::group(['prefix'=>'project'],function (){
            Route::get('getProjectInfo',['as'=>'Api.ProjectInfo.getProjectInfo','uses'=>'ProjectInfoController@getProjectInfo']);
            Route::post('setFeedBack',['as'=>'Api.ProjectInfo.setFeedBack','uses'=>'ProjectInfoController@setFeedBack']);
        });
    });
});
